//
//  MapMainView.h
//  dataGathering
//
//  Created by apple on 14-11-6.
//  Copyright (c) 2014年 shuili. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <ArcGIS/ArcGIS.h>
#import "MZFormSheetController.h"
#import "newCollectedDataViewViewController.h"
#import "HandDrawingHandler.h"
#import "SpatialSearchHandler.h"
#import "FeatureDataManager.h"


@interface MapMainView : UIViewController<CLLocationManagerDelegate, AGSMapViewLayerDelegate, HandDrawingHandlerProtocol, AGSMapViewTouchDelegate, AGSCalloutDelegate, SpatialSearchHandlerProtocol, FeatureDataManagerProtocol, AGSFeatureLayerQueryDelegate, AGSLayerCalloutDelegate>{
    CLLocationManager *locationMgr;
    AGSMutablePolygon *currentRecordingPolygon;
    AGSGraphic *g;

}
- (IBAction)menuButtonClicked:(id)sender;
- (void)removeNewDataWindow;
- (IBAction)moveToCurrentLocationButtonClicked:(id)sender;
- (void)setCurrentType :(NSString*)type;
- (void)setMainType :(NSString*)mainType;
- (void)beginHandDrawingMode :(NSInteger)index :(NSString*)mode;
- (void)setSelectedLayerVisibleUsingName :(NSString*)layername visible:(BOOL)isVisible;

-(BOOL)checkIfMapLayersIsVisible: (NSString*)layername;

-(NSArray*)queryDataFromFeatureLayers:(NSString*)queryString;

@property (weak, nonatomic) IBOutlet AGSMapView *mainMapVIew;
@property(nonatomic, retain)UIButton *mapLayersButton;
@property(nonatomic, retain)UIButton *searchButton;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (nonatomic, retain)NSString *collectionTitle;
@property (nonatomic,retain)UIButton *addTaskButtonView;
@property(nonatomic, retain)UIViewController *addNewDataNavVC;
@property(nonatomic, retain)UIViewController *dataSearchNavNC;
@property (weak, nonatomic) IBOutlet UILabel *plottingScaleLabel;
@property (weak, nonatomic) IBOutlet UILabel *xCoordinate;
@property (weak, nonatomic) IBOutlet UILabel *yCoordinate;
@property (weak, nonatomic) IBOutlet UIButton *moveToCurrentLocationButton;
@property (nonatomic,retain)UIViewController* mapLayersVC;
@property (nonatomic, retain)NSString *gpsCollectingType;

@property (nonatomic, retain)NSMutableDictionary *featureOnlineLayersDict;
@property (nonatomic, retain)NSMutableDictionary *featureOfflineLayersDict;
@property (nonatomic, retain)NSMutableDictionary *mapOnlineLayerDict;
@property (nonatomic, retain)NSMutableDictionary *mapOfflineLayerDict;

@property(nonatomic, retain)MZFormSheetController *mainMenuFormSheet;

@end
